#ifndef LESSON_H
#define LESSON_H

#include "phrasecollection.h"
#include <QFile>

class Lesson : public PhraseCollection
{
public:
    Lesson();
    QDomNode toXML(QDomNode node) const;
    void toXML(QString filename) const;
    void toXML(QTextStream& stream) const;
    void fromXML(QString filename);

    void setName(QString);
    void setIcon(QString);
    void setDescription(QString);
    void setDifficulty(int);

    QString getName() const;
    QString getIcon() const;
    QString getDescription() const;
    int getDifficulty() const;

    void shuffle();
    void shuffle(int);

    // equal to QString if getName() == QString
    bool operator==(const QString& other) const;

    bool equals(const Lesson& other) const;
    bool operator==(const Lesson& other) const;

private:
    QString name;
    QString icon;
    QString description;
    int difficulty;

};

#endif // LESSON_H
